<?php
namespace plugins\order\model;
use think\Model;
use think\Db;

class OrderGoodsListModel extends Model
{

	//库存获取
	public function getOrderGoodsStockAttr($value,$data)
	{

		$info =  ( new \plugins\goods\model\GoodsSpecListModel )->get(['sku'=>$data['order_goods_sku']]);
		if($info){
			$stock = $info->num;
		}else{
			$stock = "sku未查询到商品！";
		}
		
		return $stock;
	}	

}